<div class="offer <?php echo isset($promo) && $promo ? 'promo' : '' ?> clearfix">
  <div class="left">
    <img class="offer-image" src="/uploads/offers/small/<?php echo $offer->getImage()->getImage() ?>" />
    <div class="discount-percent p<?php echo round($offer->getDiscountPercent()) ?>" id="<?php echo $offer->getId() ?>">
      <strong><?php echo $offer->getDiscountPercent() ?>% reducere</strong>
    </div>
    <!--[if IE 6]>
    <script>
       DD_belatedPNG.fixPng(document.getElementById('<?php echo $offer->getId() ?>'));
     </script>
    <![endif]-->    
  </div>
  
  <div class="right">
    <h2>
      <a href="<?php echo url_for('out/index?oid='.$offer->getId()) ?>" target="_blank"><?php echo htmlspecialchars_decode($offer->getName()) ?></a>
    </h2>
    
    <div class="time">
      <?php if($expiration_time = $offer->getExpirationTime()): ?>
        Expira in <?php echo $expiration_time['hours'] ?> ore si <?php echo $expiration_time['minutes'] ?> minute
      <?php else: ?>
        Reducere expirata
      <?php endif; ?>
          <?php if(sfConfig::get('sf_environment') == 'dev'): ?>
        <br /><a href="<?php echo $offer->getUrl() ?>" target="_blank"><?php echo $offer->getUrl() ?></a>
      <?php endif; ?>
    </div>
    <div class="fb-like">
      <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=132672426807598&amp;xfbml=1"></script><fb:like href="<?php echo url_for($offer->getRouteName().'?id='.$offer->getId(), true) ?>" send="false" layout="button_count" width="100" show_faces="false" font=""></fb:like>
    </div>
       
    <div class="description">
      <?php echo Utils::limitString(strip_tags(htmlspecialchars_decode($offer->getDescription())), 255, true) ?> <a href="<?php echo url_for($offer->getRouteName2().'?id='.$offer->getId().'&name='.Utils::slugify(strip_tags(htmlspecialchars_decode($offer->getName())))) ?>">(vezi mai mult)</a>
    </div>
    
    <?php if($offer->getSiteId()): ?>
      <div class="provider">
        <?php if($offer->getDiscountPercent() >= 80): ?>
          Cadou oferit de
        <?php else: ?>
          Reducere oferita de
        <?php endif; ?>
        <?php if($offer->getSite()->getLogo()): ?>
          <img src="/uploads/sites/<?php echo $offer->getSite()->getLogo() ?>" alt="<?php echo $offer->getSite() ?>"/>
        <?php endif; ?>
        <strong><a href="<?php echo url_for('out/index?sid='.$offer->getSiteId()) ?>" target="_blank"><?php echo $offer->getSite() ?></a></strong>
        in <?php echo $offer->getCitiesString() ?>
      </div>
    <?php endif; ?>
  </div>

</div>